<template>
    <a-modal :title="$t('View') + 'OAuth2' + $t('服务端')" v-model='isShow' :maskClosable='false' v-dragModal width="900px"
        footer="">
        <div>
            <a-row :gutter="20">
                <a-col :span="4">{{ $t('授权名称') + ':' }}</a-col>
                <a-col :span="8">{{ detailList.auth_name }}</a-col>
                <a-col :span="4">{{ $t('授权URL') + ':' }}</a-col>
                <a-col :span="8">{{ detailList.auth_url }}</a-col>
            </a-row>
            <a-row :gutter="20" class="pt-10">
                <a-col :span="4">{{ $t('用户角色') + ':' }}</a-col>
                <a-col :span="8">{{ roleMap.get(detailList.role_id) }}</a-col>
                <a-col :span="4">{{ $t('服务端类型') + ':' }}</a-col>
                <a-col :span="8">{{ typeMap.get(detailList.access_type) }}</a-col>
            </a-row>
            <a-divider />
            <a-row :gutter="20" class="pt-10">
                <a-col :span="4">{{ $t('获取token地址') + ':' }}</a-col>
                <a-col :span="8">{{ detailList.get_token_url }}</a-col>
                <a-col :span="4">{{ $t('用户信息地址') + ':' }}</a-col>
                <a-col :span="8">{{ detailList.get_user_url }}</a-col>
            </a-row>
            <a-row :gutter="20" class="pt-10">
                <a-col :span="4">{{ $t('退出登录地址') + ':' }}</a-col>
                <a-col :span="8">{{ detailList.login_out_url }}</a-col>
                <a-col :span="4">{{ $t('客户端ID') + ':' }}</a-col>
                <a-col :span="8">{{ detailList.client_id }}</a-col>
            </a-row>
            <a-row :gutter="20" class="pt-10 mb-20">
                <a-col :span="4">{{ $t('客户端密钥') + ':' }}</a-col>
                <a-col :span="8">{{ detailList.client_secret }}</a-col>
                <a-col :span="4">{{ $t('回调地址') + ':' }}</a-col>
                <a-col :span="8">{{ detailList.redirect_uri }}</a-col>
            </a-row>
        </div>


    </a-modal>
</template>

<script>

export default {
    props: {
        detailList: {
            type: Object,
            required: true
        }
    },
    data() {
        return {
            isShow: false,

            detailInfo: {
                client_name: '1',
                client_uri: '1',
                redirect_uri: '1',
                client_id: '1',
                client_secret: '1',
                authorize_url: '1',
                token_url: '1',
                userinfo_url: '1',

            },
            roleMap: new Map([
                [0, '超级管理员'],
                [1, '系统管理员'],
                [2, '运维人员'],
                [3, '审计人员'],
            ]),
            typeMap: new Map([
                [1, 'General']
            ])
        };
    },

}
</script>